package com.ctgu.computer.service.impl;

import com.ctgu.computer.domain.po.ChargingPosition;
import com.ctgu.computer.mapper.MapMapper;
import com.ctgu.computer.service.MapService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class MapServiceImpl implements MapService {

    private final MapMapper mapMapper;

    @Override
    public void addCharingPosition(ChargingPosition chargingPosition) {
        mapMapper.insertCharging(chargingPosition);
    }

    @Override
    public void deletePoint(Integer id) {
        mapMapper.deleteChargingPoint(id);
    }

    @Override
    public void update(Integer id) {
        mapMapper.update(id);
    }

    @Override
    public List<ChargingPosition> getAllCharging() {
        return mapMapper.selectAll();
    }
}
